package com.timguan.render.api.entity.cms;

import java.io.Serializable;

/**
 * 专题对应的page信息
 * Created by guankaiqiang on 2015/3/22.
 */
public class CMSPage implements Serializable {
    /**  */
    private Integer pageId;
    /**
     * 0表示pc，1表示h5 ,2表示 APP
     */
    private Integer type;

    /**
     * 是否需要302转跳
     */
    private boolean need302Redirect;
    /**
     * 调用方式重定向 接口/html
     */
    private boolean needInvokeRedirect;
    /**
     * 转跳地址
     */
    private String  redirectUrl;

    public CMSPage(Integer pageId, Integer type) {
        this.pageId = pageId;
        this.type = type;
    }

    public CMSPage(Integer pageId, Integer type, boolean need302Redirect, boolean needInvokeRedirect, String redirectUrl) {
        this.pageId = pageId;
        this.type = type;
        this.need302Redirect = need302Redirect;
        this.needInvokeRedirect = needInvokeRedirect;
        this.redirectUrl = redirectUrl;
    }

    public Integer getPageId() {
        return pageId;
    }

    public void setPageId(Integer pageId) {
        this.pageId = pageId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public boolean isNeed302Redirect() {
        return need302Redirect;
    }

    public void setNeed302Redirect(boolean need302Redirect) {
        this.need302Redirect = need302Redirect;
    }

    public boolean isNeedInvokeRedirect() {
        return needInvokeRedirect;
    }

    public void setNeedInvokeRedirect(boolean needInvokeRedirect) {
        this.needInvokeRedirect = needInvokeRedirect;
    }

    public String getRedirectUrl() {
        return redirectUrl;
    }

    public void setRedirectUrl(String redirectUrl) {
        this.redirectUrl = redirectUrl;
    }

    @Override
    public String toString() {
        return "CMSPage{" +
                "pageId=" + pageId +
                ", type=" + type +
                ", need302Redirect=" + need302Redirect +
                ", needInvokeRedirect=" + needInvokeRedirect +
                ", redirectUrl='" + redirectUrl + '\'' +
                '}';
    }
}
